﻿using System;
using System.Collections.Generic;
using System.Text;

namespace GN.Data.Entity.Attribute
{
    public class StringLengthAttribute : BaseAttribute
    {
        public const int MaxText = int.MaxValue;
        /// <summary>
        /// 最大长度
        /// </summary>
        public int MaximumLength { get; set; }
        /// <summary>
        /// 最小长度
        /// </summary>
        public int MinimumLength { get; set; }

        public StringLengthAttribute()
        {

        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="maximumLength">最大长度</param>
        public StringLengthAttribute(int maximumLength)
        {
            this.MaximumLength = maximumLength;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="minimumLength">最小长度</param>
        /// <param name="maximumLength">最大长度</param>
        public StringLengthAttribute(int minimumLength, int maximumLength)
        {
            this.MaximumLength = maximumLength;
            this.MinimumLength = minimumLength;
        }
    }
}
